import { createApp } from 'vue';
import App from './App.vue';
import ElementPlus, { ElMessage } from 'element-plus'; // 合并导入 ElementPlus 和 ElMessage 组件
import 'element-plus/dist/index.css'
import './assets/main.css'
//导入中文包
import zhCn from 'element-plus/es/locale/lang/zh-cn.mjs' // 引入中文包
const app = createApp(App);

app.config.globalProperties.$message = ElMessage; // 将 ElMessage 挂载到全局属性上

import { createPinia } from 'pinia'

import router from './router'
import axios from 'axios'
import { createPersistedState } from 'pinia-persistedstate-plugin';
const pinia = createPinia();
pinia.use(createPersistedState());
//挂载axios
app.config.globalProperties.$axios = axios
app.use(pinia)
app.use(router)
app.use(ElementPlus,{
    locale: zhCn,
  })

app.mount('#app')